// import Home from "@/pages/Home/Home";
// import Login from "@/pages/Login";
// import Register from "@/pages/Register";
// import Search from "@/pages/Search";
// import NotFind from "@/pages/NotFound";
// import Detail from "@/pages/Detail"
// import AddShopCart from "@/pages/AddShopCart"
// import ShopCart from "@/pages/ShopCart"
// import Trade from '@/pages/Trade'
// import Pay from '@/pages/Pay'
// import paySuccess from '@/pages/PaySuccess'
// import Center from '@/pages/Center'

const NotFind =()=> import('@/pages/NotFound')
const Home = ()=>import('@/pages/Home/Home')
const Login = ()=>import('@/pages/Login')
const Register = ()=>import('@/pages/Register')
const Detail = ()=>import('@/pages/Detail')
const AddShopCart = ()=>import('@/pages/AddShopCart')
const Trade = ()=>import('@/pages/Trade')
const Pay = ()=>import('@/pages/Pay')
const paySuccess = ()=>import('@/pages/PaySuccess')
const Center = ()=>import('@/pages/Center')
const ShopCart = ()=>import('@/pages/ShopCart')
const Search = ()=>import('@/pages/Search')

export default[
    {
    name:'home',
    path:"/home",
    component:Home,
    meta:{
        isshowNav: true  //是否显示导航
    }
    },
    {
        name:'login',
        path:"/login",
        component:Login,
        meta:{
            isHiddenFooter:true
        }
    },
    {
        name:'register',
        path:"/register",
        component:Register,
        meta:{
            isHiddenFooter:true
        }
    },
    {
        name:"search",
        path:"/search/:keyword?",  //？表示可能有也可能没有,params参数必须站位(restuful风格)
        component:Search,
    },
    {
        name:'detail',
        path:"/detail/:skuId",
        component:Detail,
        props:true,
    },
    {
        name:"addShopCart",
        path:"/addShopCart",
        component:AddShopCart,
    },
    {
        name:"shopCart",
        path:"/shopCart",
        component:ShopCart
    },
    {
        name:'trade',
        path:"/trade",
        component:Trade
    },
    {
        name:'pay',
        path:'/pay',
        component:Pay
    },
    {
        name:'paySuccess',
        path:'/paySuccess',
        component:paySuccess
    },
    {
        name:'center',
        path:'/center',
        component:Center
    },
    {
        path:"/",
        redirect:"/home"  //重定向到主页面
    },
    {
        path:"/notfind",
        component:NotFind
    },
    {
        path:"*",
        redirect:"/NotFind"
    },


]